#include "bObject.h"
#include <ostream>

bObject::bObject(void):_reference(0){}

void bObject::refer(){_reference++;}

bool bObject::derefer(){return --_reference==0;}

bool bObject::is(bObject*p){return p==this;}

bool bObject::operator == (bObject* ptr)
{
	return is(ptr);
}

bObject::~bObject(void){}

std::ostream& operator << ( std::ostream& out, bObject* ptr)
{
	out << "[ " << typeid(*ptr).name() << "-object at 0x" << std::hex << ((unsigned long int)ptr) <<" ]";
	return out;
}